package org.asiainfo.flowable.service;

import org.asiainfo.common.mybatis.stream.core.page.TableDataInfo;
import org.asiainfo.common.mybatis.stream.core.page.PageQuery;

import java.util.Collection;
import java.util.List;

import org.asiainfo.flowable.domain.vo.WfDeployFormVo;
import org.asiainfo.flowable.domain.bo.WfDeployFormBo;
import org.asiainfo.flowable.domain.WfDeployForm;
import com.mybatisflex.core.service.IService;
import org.asiainfo.flowable.domain.vo.WfFormVo;
import org.flowable.bpmn.model.BpmnModel;

/**
 * 流程实例关联表单Service接口
 *
 * @author dotor-ww
 */
public interface WfDeployFormService extends IService<WfDeployForm> {

    /**
     * 通过deployId查询单条数据
     *
     * @param deployId 主键
     * @return 实例对象
     */
    WfDeployFormVo queryById(String deployId);

    /**
     * 查询
     *
     * @param wfDeployFormBo 筛选条件
     * @return 查询结果
     */
    List<WfDeployFormVo> queryList(WfDeployFormBo wfDeployFormBo);

    /**
     * 分页查询
     *
     * @param wfDeployFormBo 筛选条件
     * @param pageQuery      分页对象
     * @return 查询结果
     */
    TableDataInfo<WfDeployFormVo> queryPageList(WfDeployFormBo wfDeployFormBo, PageQuery pageQuery);

    /**
     * 新增数据
     *
     * @param wfDeployFormBo 实例对象
     * @return 实例对象
     */
    Boolean insertByBo(WfDeployFormBo wfDeployFormBo);

    /**
     * 修改数据
     *
     * @param wfDeployFormBo 实例对象
     */
    Boolean updateByBo(WfDeployFormBo wfDeployFormBo);

    /**
     * 通过主键删除数据
     *
     * @param deployIds 主键
     */
    Boolean deleteWithValidByIds(Collection<String> deployIds);

    /**
     * 查询流程部署关联表单信息
     *
     * @param deployId 流程部署ID
     * @return 流程部署关联表单信息
     */
    WfFormVo queryFormByDeployId(String deployId);

    /**
     * 保存流程实例关联表单
     *
     * @param deployId  流程部署ID
     * @param bpmnModel 流程模型
     * @return 保存结果
     */
    Boolean saveInternalDeployForm(String deployId, BpmnModel bpmnModel);
}
